package com.sds.batch.sample;

import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.NonTransientResourceException;
import org.springframework.batch.item.ParseException;
import org.springframework.batch.item.UnexpectedInputException;

public class ExampleItemReader implements ItemReader<String> {

	private static int count = 0;
	
	@Override
	public String read() throws Exception, UnexpectedInputException, ParseException,
			NonTransientResourceException {
		// TODO Auto-generated method stub
		if(count<2) {
			count++;
			return "Test String From ExampleItemReader!!";
		}
		else
			return null;
	}

}
